package com.hackordie.interfaces;

import com.hackordie.commons.authorities.Role;
import com.hackordie.commons.authorities.User;
import com.hackordie.commons.authorities.UserAccess;
import com.hackordie.exceptions.HackOrDieException;

public interface IHackOrDieManager {

	public boolean loginUser(String username, String password) throws HackOrDieException;

	public boolean createUser(User user) throws HackOrDieException;

	public boolean deleteUser(int id) throws HackOrDieException;
	public boolean deleteUser(String username) throws HackOrDieException;

	public boolean updateUser(User user) throws HackOrDieException;

	public boolean enableUser(int id) throws HackOrDieException;
	public boolean enableUser(String username) throws HackOrDieException;

	public boolean disableUser(int id) throws HackOrDieException;
	public boolean disableUser(String username) throws HackOrDieException;

	public boolean setRoleUser(int id, Role[] roles) throws HackOrDieException;
	public boolean setRoleUser(String username, Role[] roles) throws HackOrDieException;

	public User getUser(int id) throws HackOrDieException;
	public User getUser(String username) throws HackOrDieException;

	public User[] getAllUsers() throws HackOrDieException;
	public User[] getAllUsersByRange(int first, int last) throws HackOrDieException;
	public int countAllUsers() throws HackOrDieException;
	
	public UserAccess[] getUserAccess(int id) throws HackOrDieException;
	public UserAccess[] getUserAccess(String username) throws HackOrDieException;
	
	public UserAccess[] getAllAccess() throws HackOrDieException;
}
